home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
utils
/
dtu140
/
dtu.doc
< prev
Wrap
Text File
|
1995-03-13
|
35KB
|
669 lines
==============================================================================
==============================================================================
Intro:
======
Hi there. Here is yet another update of the most compact and easy
to use programming tool: The Original DTown Utilities.
I really needed a popup-tool to aid my programming activities. I had
used SideKick (tm) before, but in combination with the modern
programming environments from Borland, it blocked my CPU! So I wrote
some of my own utils. I quite like the result. I've become really used
to them now, so maybe you can too! Some explanation:
There are two different methods to let DTU pop up. In the first
(and default) DTU pops up whenever you press CTRL and ALT together
(default key-combination), and you are in text-mode 2,3 or 7. It
doesn't work in graphic modes, but hey, who programs in Windows! But
if you want to use e.g. CTRL-ALT-X in a certain program, DTU
immediately swaps back to the background, taking no action and simply
letting the foreground program get the key... Also if you hold CTRL-ALT
longer than 1 second (20 clock-ticks) it disappears. The second method
does not need that much explanation: Simply press SysReq
(Alt-PrintScreen) and DTU pops up...
==============================================================================
==============================================================================
Technical Information:
======================
DTU is coded in 100% assembly, coded in over 10,000 lines. It requires
a 80386 processor and at least an EGA-card. It always traps Interrupt 3
(breakpoint), Interrupt 8 (system timer), Interrupt 13 (disk services),
Interrupt 25/26 (absolute disk read/write), Interrupt 28 (DOS idle
interrupt), Interrupt 2A (network services) and Interrupt 2D (alternative
multiplex interrupt). By default Interrupt 9 (keyboard-handler) is
trapped, but this can be turned off. Interrupt 15 (AT service routines)
may be trapped to provide a second way to pop-up. Some explanation of
why all these interrupts are hooked:
Interrupt 03: Trapped to provide quick-popup. See Using Int 3 below.
Interrupt 08: Update stopwatch counter and some internal counters.
Also scans the shift-key status byte to see if popup
is requested. (Only in default popup mode, i.e. no /s)
Interrupt 09: Keeps track of incoming scancodes from the keyboard.
Interrupt 15: Trapped in second popup mode to detect SysReq.
Interrupt 28: This is called by DOS to signal that disk access is safe.
Used as a gate to pop up.
Interrupt 2D: Provides the DTU Application Programmers Interface (API).
Read about the API below.
Interrupts 13/25/26/2A are hooked to determine if it is safe for DTU to
access the disk (File Lister). At such moments, it's always safe to
pop up. If disk access is still not safe after 10 timer-ticks, then
popup is forced, but disk access is unstable!
To minimize the amount of data used, all of DTU's screen-data and
scroll-data are compressed to become about 14% of their original size.
Fast decompression of all the data is used, so you won't notice any
delays. All the disassembler look-up tables are also heavily compressed.
If you still seek to spare more memory, check out the commandline option
/Dx... If you have installed an Expanded Memory Manager, DTU can load
itself into EMS-Memory, leaving only a small loader resident in low
memory. If not, normal TSR-mode is automatically used. Also, if an EMM
is installed, the File Lister becomes active. It uses physical page
three of EMS-Memory to load/save/show file contents...
==============================================================================
==============================================================================
History:
========
Version 1.00 : Release: 06 October 1993
Features: * ASCII-Table with ASCII-Boxes to scroll around
* Memory Viewer
* CPU-Status screen
* Calculator
* Keytester
* Ruler
* Stopwatch
* Online-help
* Automatic 386 detection
* EMS-loadable
==============================================================================
Version 1.01 : Release: 07 October 1993
Modified features: * Removed a few keys that I used for debugging
DTU 1.00.
New features: * Added the detection for EGA-cards.
==============================================================================
Version 1.02 : Release: 14 October 1993
Modified features: * Created new division-routine for the
calculator: Now allows division by numbers
larger than 2^32-1.
* Allowed digits to be in the name of the
program that traps an interrupt.
New features: * Added the !-operator to the calculator.
* Created more advance calculator-routines for
easier calculation with negative numbers.
==============================================================================
Version 1.03 : Release: 03 November 1993
Modified features: * Division by zero now creates a division error.
New features: * Added the posibility of changing memory-
variables.
==============================================================================
Version 1.10 : Release: 18 December 1993
New features: * Added the AND, OR, XOR and NOT operators to
the calculator.
* Added the memory-variables in the calculator.
==============================================================================
Version 1.15 : Release: 30 December 1993
Modified features: * Now writes correctly to the active textpage...
(Some routines always wrote to page 0!)
* Did some internal changes...
New features: * Added extended keyboard options. Read the
section on the extended keyboard below to find
out it's precise working.
==============================================================================
Version 1.16 : Release: 14 January 1994
Modified features: * Now correctly displays SS:ESP. ESP was always
displayed as ESP-6 (I didn't add the three
words for calling an Int).
New features: * Added B,C,D,E,S and X to the memory-view
keylist. Now you can jump to your code/data/
stack easier.
==============================================================================
Version 1.20 : Release: 25 March 1994
Modified features: * Now the Online Help has real help pages. All
in compressed form of course...
New features: * Added the File Lister.
* DTU now automatically frees the memory
occupied by it's copy of the DOS environment
variables.
* DTU now uses the PSP as low-memory variable
space.
==============================================================================
Version 1.21 : Release: 30 March 1994
Modified features: * Oops! Because of the new screen (File Lister)
there were some incompatibilities in the Misc-
Tools and Calculator screens. Sorry for
insufficient testing...
New features: * Now the File Lister can save screen-dumps.
==============================================================================
Version 1.22 : Release: 18 April 1994
Modified features: * The scroll-data now is even better compressed.
* It seems there still was a problem with the
ESP-display. It's now in the past for good...
* The CPU-Status can now also display TSR's
that are loaded into High Memory and trap
an interrupt.
* Removed all DRQ's, because I grew tired of
doing all the maintenance. (You never used
them anyway, did you ?!?! I didn't...)
New features: * The Memory-Viewer can now search for strings
in memory (and pretty fast too!).
* The CPU-Status is modified to be able to
display the 80386 Control Registers and some
extra 80486 and Pentium Flags.
* The File Lister can now handle TAB's also.
* If all is good (and I hope it is), the
problems with some Expanded Memory Managers
(like QEMM386) are solved.
==============================================================================
Version 1.23 : Release: 28 April 1994
Modified features: * The Memory-Viewer can now display data from
the High Memory Area (First 64k above 1MB).
New features: * Memory-View allows an address to be entered to
jump to (and be referenced to from then).
==============================================================================
Version 1.30 : Release: 21 June 1994
Modified features: * Monochrome monitor (80x25 mode) is supported.
* I redefined some keys. Hopefully you'll adjust
to them as fast as I did.
New features: * New /0../7 options from command-line. This
solves the problems that some people had with
Version 1.22 and 1.23 and the CPU-Status.
* File Lister can now save buffers to disk, so
you can save screen dumps in a file.
* Well, another utility saw the light: DTU's
Symbolic DisAssembler. It can disassemble
instructions up to the 80486.
==============================================================================
Version 1.31 : Release: 08 September 1994
Modified features: * The Disassembler Tables are now compressed
on a binary level. This compresses the tables
to about 70% of their byte level equivalents.
* Also better screen compression.
* Better OpCode-Error detection.
New features: * Upon pop-up/exit, Num-Lock is turned on/off.
==============================================================================
Version 1.32 : Release: 15 September 1994
Modified features: * Due to some code compression, the File
Lister didn't handle files correct in
Normal TSR-Mode. Solved...
* The disassembler didn't calculate jumps
correctly above the 1 MB limit.
* Disassembler now correctly prints PWORD
pointers as PWORD pointers instead of PDWORD.
==============================================================================
Version 1.33 : Release: 07 November 1994
Modified features: * AAM and AAD were printed with some strange
parameter instead of (xx). Corrected.
* The disassembler can now detect all new
instructions supported by the Pentium
processor line.
==============================================================================
Version 1.34 : Release: 20 November 1994
New features: * Added start-up options /L, and /S.
==============================================================================
Version 1.35 : Release: 06 December 1994
Modified features: * DTU now supports screen swapping by other
TSRs (eg. K3PLUS). No extra code was needed,
just a change in code-sequence...
==============================================================================
Version 1.40 : Release: 28 December 1994
Modified features: * Better index tables for the DisAssembler.
This results in more disassembly speed!
New features: * Added the display of the 80x87 co-processor
status.
* Added the stopwatch day counter. The stop-
watch can now count up to 2730 days and
16 hours. (At normal timer speed...)
* Added the DTU API. Read DTU-API.DOC.
* Complete new install procedure. It allows
utilities not to be installed. See command-
line option /D.
* Upon popup DTU detects automatically if it
is safe to access the disk (File Lister).
* Added the command-line option /P.
==============================================================================
==============================================================================
Starting DTU:
=============
Usage: DTU [options]
The start-up options are:
/dx : Don't keep utility x resident. X is one of the following:
0 = ASCII Table
1 = Memory Viewer
2 = CPU Status
3 = CoProcessor Status
4 = Calculator
5 = Misc. Tools
6 = File Lister
7 = DisAssembler
Note: * The CoProcessor Status is only installed if the CPU
Status is also installed !!
* The File Lister is only installed if an Expanded
Memory Manager is installed !!
/k : Don't allow DTU to hook Interrupt 9. When this switch
is used, the INT 9 Buffer in the Misc.Tools Screen is
turned off, and Interrupt 9 is not hooked. Automatic if
option /d5 is used.
/l : Disables Num-Lock control. When this switch is used, DTU
does not force Num-Lock when activated.
/n : Forces DTU to install in regular TSR-Mode. Could be helpful
when you want to view some EMS-Memory of your own, mapped
on physical pages 0,1 and 3...
/px : Specify alternative popup keys for the default popup mode.
x can be one of 0..9.
0 = Left-Shift / Right-Shift
1 = Ctrl / Right-Shift
2 = Ctrl / Left-Shift
3 = Ctrl / Left-Shift / Right-Shift
4 = Alt / Right-Shift
5 = Alt / Left-Shift
6 = Alt / Left-Shift / Right-Shift
7 = Ctrl / Alt / Right-Shift
8 = Ctrl / Alt / Left-Shift
9 = Ctrl / Alt / Left-Shift / Right-Shift
/s : Use the Sys-Req key for pop-up. When specified, CTRL-ALT
is no longer active, but instead the SysReq (ALT-PrintScreen)
is DTU's hot-key.
/0..7 : Some EMS Managers don't like DTU reading and displaying
some 386 control-registers. To check your system, test all
options from /0 to /7 separately. Use the highest option
that creates no error (0=lowest, 7=highest). The option
/0 should ALWAYS work !
(Default = /7)
==============================================================================
==============================================================================
Using DTU:
==========
DTU contains several screens with separate utilities. To swap from one
utility to another, use F1 to F7. If you want online help, press F10.
You can also use CTRL-Left arrow and CTRL-Right arrow to swap to the
previous/next utility. (Nice to check the speed of assembly: Keep
holding CTRL-Left/Right... :-) )
* ASCII-Table : Arrows : Move around the box-characters
(F1) PG-UP/DN : One page back/forward in ASCII-Table
HOME/END : Top/End of ASCII-Table
Use the quick-ref for a quick search for a special
character...
* Memory View : T : Toggle between peek and poke-mode
(F2)
** PEEK-MODE **
LEFT/RIGHT : Swap view-mode
ENTER : Go to the next view-mode
UP/DOWN : One segment back/forward in memory
PG-UP/DN : 16 segments back/forward in memory
CTRL-PG-UP/DN : 256 segments back/forward in memory
HOME/END : Top/End of memory
A : Jump to DisAsm's current top-address
F : Search memory for a string
(Case-Insensitive)
L : Jump to last match
N : Search memory for next match
J : Enter an address to jump to
K : Jump to last entered address
To jump to frequently used memory locations press:
B : Jump to SS:EBP
C : Jump to CS:IP
D : Jump to DS:ESI
E : Jump to ES:EDI
S : Jump to SS:ESP
X : Jump to DS:EBX
All of the memory variables referenced by one of
these above are displayed in yellow, except the
one last jumped to. That one is red. The reference
will be shown at the right of the table, as long as
the variable is displayed. All string-matches are
displayed in purple.
** POKE-MODE **
Arrows : Move around page with pointers
+,- : Increase/Decrease byte
Continuously updates screen, so you can watch some
variables change... (See 0040:0040 and 0040:006C)
* CPU-Status : UP/DOWN : One interrupt back/forward
(F3) PG-UP/DN : 4 interrupts back/forward
HOME/END : Top/End of interrupt-list
ENTER : Swap between 80x86 and 80x87 status
The CoProcessor Status does not have any keys
to control it...
Display (stack)registers, flags, interrupts etc. etc...
* Calculator : LEFT/RIGHT : Swap view-mode
(F4) UP/DOWN : Swap input-mode
0..9, A..F : Enter a number
&, |, X, N : Logical And/Or/Xor/Not
BACKSPACE : Back-up one digit
+, -, *, / : Add, substract, multiply, divide...
! : Negate the number being entered
ENTER/= : View outcome
ALT-C : Clear this number/Clear all
ALT-B/O/D/H/T : Swaps to Bin/Oct/Dec/Hex/Text-mode
ALT-N/S : Swaps to Normal/Separated display-mode
Q : Quick-look at the screen before pop-up
ALT-F1..ALT-F6: Store current value in memory-variable
CTRL-F1..CTRL-F6: Use memory-variable
* Misc. Tools : LEFT/RIGHT : Swap keyscanner-mode
(F5) ENTER : Go to the next keyscanner-mode
K : Activate keyscanner:
Press any key you like. ASCII-value
and scancode are displayed. Press
ESCAPE twice to exit... (Read
the section about the extended
keyboard for the differences of
the keyscan-modes.)
R : Activate ruler:
Use arrows to move the ruler. X and
Y coordinates are displayed along
with the offset in video-memory.
Press ESCAPE to exit...
S : Activate stopwatch-control:
Use S to start/stop the stopwatch,
and C to clear. Stopwatch will count
timer-ticks, so, in an interrupt-
enabled loop, it varies about half
a second per hour. Press ESCAPE
to exit...
The INT 9 Watcher displays the last 16 scan-codes
received from the keyboard. The red arrows point at the
last scan-code that was received...
* File Lister : UP/DOWN : Scroll text up/down
(F6) LEFT/RIGHT : Scroll text left/right
SHIFT-LEFT : Jump back to left origin
PAGE UP/DOWN : Scroll one text page up/down
HOME/END : Jump to top/bottom of file
L : Load new file into active buffer
W : Write buffer to file
R : Release active buffer
S : Load screen dump into active buffer
F : Find string (not yet fully implemented)
CTRL-F1..CTRL-F4: Switch to buffer 1..4
There are 4 independant buffers available. The maximum
size of a file that can be loaded into a buffer, depends
on the size of EMS-Memory available.
Some notes: - The File Lister only is loaded when an
Expanded Memory Manager is also loaded.
- Screen saves will be made of the complete
screen, even if it's height is 43 or 50
rows...
* Disassembler: UP/DOWN : One byte/instruction up/down
(F7) PG-UP/DN : 13 bytes/instructions up/down
HOME/END : Jump to lineair 0/10FFEFh
(SHIFT-)RIGHT : Follow jump or call at the top with(out)
pushing current address to JumpStack
LEFT : Pop address from JumpStack
C : Jump to CS:IP
M : Jump to Memory Viewer's current address
Some notes: - Since this option is rather new, there
may be still some opcodes that DTU does
not expect. Of course I tested as much
of them as possible, but I may have
overlooked some.
- I chose for lineair addressing for the
sole reason that I didn't want to spend
time on boring segment calculation...
- If the Memory Viewer is in peek mode, the
pressing of M will set the top address to
the top address of the Memory Viewer,
otherwise the top address is set to the
address where MV's pointer is located.
* Help screen : PG-UP/DN : One help page up/down
HOME/END : Jump to first/last help page
==============================================================================
==============================================================================
Using Int 3:
============
I find it usefull (especially when programming in assembly) to be able to
check all registers, flags, interrupts and memory-variables at certain
points. So I found the perfect solution: Simply call Int 3 and DTU
pops-up so you can easilly verify them all. Also, since version 1.30, you
can check out what your program is going to do in the next few
instructions by pressing F7 and C...
==============================================================================
==============================================================================
Extended Keyboard Options:
==========================
If you have installed an extended keyboard, DTU detects it. This will
give you the option of using 3 keyscanner-modes. The first is the normal
one (Int 16h,0). The second one uses the extended keyboard routines in
BIOS (Int 16h,10h). This will allow you to scan for e.g. F11 and F12.
The third mode is used to synchronize between the first two. It also
uses the extended keyboard routines, but the key will be translated
using the algorithm below. By using this, the difference between e.g.
the two DEL-keys won't be noticed.
Translation-method:
Key is assumed to be stored in 2 bytes: HI and LO,
HI is the scancode, LO is the ASCII-value.
Translation: IF (LO=E0h OR LO=E1h) AND HI>=47h THEN LO:=0
HI and LO now contain the translated key-values.
==============================================================================
==============================================================================
DTU API:
========
Since version 1.40 DTU has a fully documented API. It is located at
Interrupt 2Dh (Alternative Multiplex Interrupt, AMI). The API s
described in DTU-API.DOC. Some example code is included in DTU-API.ASM
to let you understandthe description a little better above...
If you think of ANY API-function that you could really use, don't
hesitate to contact me...
==============================================================================
==============================================================================
Trouble Shooting:
=================
If you have a problem with DTU, please check out the following first
before contacting me:
Problem: When I start DTU, it installs OK, but when I enter the CPU-
Status screen, it generates a 'General Protection exception'.
Answer: The CPU-Status tries to read some 386 internal registers to
be displayed on the screen. However, your Memory Manager
(eg. EMM386,QEMM) does not allow DTU to read those registers.
Read the section on the start-up options /0 to /7. If you
don't care about the special registers, start DTU with:
'DTU /0'. This always works.
Well, this is the most frequently asked question, so I thought I'd include
a Trouble Shooting section. Not much of a section so far, but maybe it'll
grow. (I hope not!)
==============================================================================
==============================================================================
Last remarks:
=============
Utility exclusion remarks:
--------------------------
This is the first version of DTU which supports code/data relocation.
I had to change a LOT of code to support this. All variables were at
fixed addresses in the code segment. Now all variable reference is done
via indexing through the BasePointer (BP). Also all calls to the main
program by the utilities are relative. All these calls are marked by
labels, and the Install Procedure has to modify the call-code to allow
code movement. All those labels are held in separate tables. That is
why DTU is a little bigger than the last one. However, once it is
installed, it takes up less memory, because indexing variables takes
up less space...
Update remarks:
---------------
Until now I don't really need floating-point calculation, so I didn't
implement it. Maybe it will be in a future version (I'm saying this since
the very first version, so it'll probably never be implemented!). Also
I don't need DTU to pop-up when I'm in graphics-mode, so that's not in
it either. I can imagine however that someone needs DTU to pop-up on
top of graphics. If you can provide me with some code to save the VGA
status, I'll give it a try. I just don't have the time to do any research
on this subject...
Also, a lot of people mail me about 'Can you implement this', or 'Can you
build in that'. Well, I'll go along with anything as long as it is
usefull for, say 50% of all people ! (Unless of course you can't run the
entire program for some reason...) My policy for DTU is simple: It
should be easy to use, usefull and SMALL... No offence... :-)
However, since version 1.40, it is easier to exclude code and data, so
don't be afraid to ask me...
Bugs:
-----
I debug DTU as much as possible, but I can only test DTU on my own
configuration, so yours may cause problems. If you find any bug, just
contact me. I'll (try to) remove the bug, and you'll get a new version !
Any remarks, tips, complements or bug-reports can be addressed to:
==============================================================================
==============================================================================
Credits:
========
DTown Utilities is fully coded by:
DTown Software Development
Mr Simon Buysstraat 13
4931 RB Geertruidenberg
Holland
Voice: +31 - 1621 - 13648
Fax: +31 - 1621 - 13457
Internet: jafcdiss@cs.ruu.nl
If you have an Internet mail-address, and you want to keep up with the
latest version, mail me. You'll be added to my DTU-mailinglist. Every
time an update is released, you'll be the first to get it...
==============================================================================
==============================================================================
Bye bye:
========
////// // // /////// ////// // // ///////
// // // // // // // // // //
////// ////// ///// ////// ////// /////
// // // // // // // //
////// ////// /////// ////// ////// /////// // // //
==============================================================================
==============================================================================
==============================================================================
==============================================================================